package com.coder.shop.dao.mapper;

import com.coder.shop.dao.model.ShopGoodsSku;
import com.coder.shop.dao.model.ShopGoodsSkuExample;

import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface ShopGoodsSkuMapper {
    long countByExample(ShopGoodsSkuExample example);

    int deleteByExample(ShopGoodsSkuExample example);

    int deleteByPrimaryKey(Long id);

    int insert(ShopGoodsSku record);

    int insertSelective(ShopGoodsSku record);

    List<ShopGoodsSku> selectByExample(ShopGoodsSkuExample example);

    ShopGoodsSku selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") ShopGoodsSku record, @Param("example") ShopGoodsSkuExample example);

    int updateByExample(@Param("record") ShopGoodsSku record, @Param("example") ShopGoodsSkuExample example);

    int updateByPrimaryKeySelective(ShopGoodsSku record);

    int updateByPrimaryKey(ShopGoodsSku record);
    
    public List<ShopGoodsSku> categoryGoods(@Param("typeId")Integer typeId, @Param("specs") String[] specs, @Param("startPrice") BigDecimal startPrice, @Param("endPrice") BigDecimal endPrice,
    		@Param("startPage") Integer startPage, @Param("pageSize") Integer pageSize, @Param("orderColum") String orderColum, @Param("sort") String sort);
    
    public Integer categoryGoodsCount(@Param("typeId")Integer typeId, @Param("specs") String[] specs, @Param("startPrice") BigDecimal startPrice, @Param("endPrice") BigDecimal endPrice);
}